import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni"; //官方内置的,不用下载,下面代码粘贴直接用即可

export default defineConfig({
  plugins: [uni()],
  server: {
    port: 5173,
    proxy: {
      "/api": {
        target: "http://192.168.31.8:8090", // 目标服务
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ""),
      },
      '/iframe': {
        target: 'http://58.48.93.37/wsyg/complain/notice', // 问题投诉目标服务
        changeOrigin: true,
        rewrite: path => path.replace(/^\/iframe/, ''),
      },
    },
  },
});
